<?php
namespace app\printing\model;
use app\common\model\Common;
class Printing extends Common
{
	protected $table = 'mps_printing';
	protected $append = ['state_text','is_show_text'];

	public function getStateTextAttr($value, $data)
	{
		$printing = config('repair.printing');
		return $printing['state'][$data['state']];
	}
	public function getIsShowTextAttr($value, $data)
	{
		switch($data['is_show']){
			case 0: return '已开启';break;
			case 1: return '已关闭';break;
			default: return '异常';break;
		}
	}
}